
import {request} from '../utils/request'
const app = getApp()
module.exports = {
  /**
   * 登录
   * @param {*} data 
   */
  login(data) {
    return request('/user/login/'+data, 'post', '')
  },

   /**
   * 注册
   * @param {*} data 
   */
  register(data) {
    return request('/user/register', 'post', data)
  },

   /**
   * 用户认证 
   */
  auth(data) {
    return request('/user/auth', 'post', data)
  },

   /**
   * 获取用户认证信息
   */
  authInfo() {
    return request('/user/info', 'get', '')
  },

  /**
   * 回收员资格申请 
   */
  authCollector(reason) {
    return request('/user/collector/auth/' + reason, 'post', '');
  },

   /**
   * 回收员资格申请信息 
   */
  authCollectorInfo() {
    return request('/user/collector/auth', 'get', '');
  },

  /**
   * 流水记录
   */
  moneyRecord(param) {
    return request('/user/money/record', 'get', param);
  },

  /**
   * 余额提现
   */
  withdraw(amount) {
    return request('/user/money/withdraw/'+amount, 'post', '');
  }

}